<?php !defined("IN_SYSTEM") && exit("ACCESS DENY");?>

					<div class="comments">
					<a name="comments"></a>
						{if ican('post_comment')>0}
						<div id="comment-0">
						<div class="post_comment" >

						<a name="post_comment"></a>
						<form name="post_comment" id="post_comment" method="post" action="{url ajax.php?f=comment&a=add}" onsubmit="return ajax_post_comment()">
						<input type="hidden" name="aid" id="aid" value="{$article['aid']}" />
						<input type="hidden" name="pid" id="pid" value="0" />

							<h3 id="post-comment-title"></h3>

							{if ( $_G['uid'] >0 )}
							<input type="hidden" name="isuser" id="isuser" value="1" />
							<p>您当前使用帐号 <strong>{$_G['username']}</strong></p>
							{else}

							<p><input type="text" name="username" id="username" class="input" size="30" /> <label id="tip_username" for="username">名称</label></p>
							<p><input type="text" name="email" id="email" class="input" size="30" /> <label id="tip_email" for="email">邮箱 (不公开)</label></p>
							{/if}
							<p>
							<textarea name="content" id="content" class="input" rows="3" cols="50"></textarea>
							<label id="tip_content" for="content"></label>
							</p>
							<p><input type="submit" id="submit" value="{lang submit_comment}" />
							<input type="checkbox" class="checkbox" name="hide" id="hide" value="1" /> <label for="hide">隐藏(仅管理员可见)</label>
							</p>
						</form>
						</div>
						</div>
							{/if}
						<ol id="comment_list">
							{loop $comments $comment}
							{if $comment['status']< 1 || ($_G['uid'] > 0 && $comment['uid'] != $_G['uid'])}
							{else}
							{php $i++;}
								<li id="comment-{$comment['cid']}">
									<div class="comment_title">
										<a name="comment-{$comment['cid']}">{$i}.</a><strong>{$comment['username']}</strong>
										</div>
									<div class="comment_content">
									{$comment['content']}
									<p>
									<span class="comment_time">{echo gdate('Y-m-d H:i',$comment['dateline'])}  {if ican('reply_comment')}
										<a href="#post_comment" onclick="reply_comment({$comment['cid']});">回复</a>
										{/if}</span>
									</p>
									{loop $comment['subcomment'] $subcomments}
									<div class="replay"><div class="reply_title"><strong>{$comment['username']}</strong>   <span class="reply_time">{echo gdate('Y-m-d H:i',$comment['dateline'])}</span> </div>{$subcomments['content']}</div>
									{/loop}
									</div>
								</li>
								{/if}
									{/loop}
						</ol>	

					</div>
